package com.Hsu.demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Hsu琛君珩
 * @ClassName:PropertiesController
 * @date 2023-12-10
 * @apiNote
 * @Version: v1.0
 */

@RestController
public class PropertiesController {
    //读取配置文件
    @Value("${demo.key1}")
    private String key1;

    @RequestMapping("/readKey")
    public String readKey(){
        return "读取到的配置项key1："+key1;
    }
}
